home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
c
/
cweb31p9d.lha
/
CWeb
/
makefile.pc
< prev
next >
Wrap
Makefile
|
1994-07-02
|
7KB
|
251 lines
# This file, makefile.pc, is part of CWEB.
# It is distributed WITHOUT ANY WARRANTY, express or implied.
#
# Modified for the Borland Turbo C/C++ 3.1 compiler under MSDOS by
# Andreas Scherer (Abt-Wolf-Straße 17, 96215 Lichtenfels, Germany), July 1994
# Last updated by Andreas Scherer, July 2, 1994
# Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
# Copyright (C) 1994 Andreas Scherer
# Permission is granted to make and distribute verbatim copies of this
# document provided that the copyright notice and this permission notice
# are preserved on all copies.
# Permission is granted to copy and distribute modified versions of this
# document under the conditions for verbatim copying, provided that the
# entire resulting derived work is distributed under the terms of a
# permission notice identical to this one.
#
# Read the README file, then edit this file to reflect local conditions
#
# directory for TeX inputs (cwebmac.tex, ccwebmac.tex, or gcwebmac.tex go here)
MACROSDIR= macros/
# directory for CWEB inputs in @i files
CWEBINPUTS= inputs/
# extension for manual pages ("l" distinguishes local from system stuff)
MANEXT= l
#MANEXT= 1
# directory for manual pages (cweb.1 goes here)
MANDIR=
# destination directory for executables; must end in /
DESTDIR= bin/
# directory for GNU EMACS Lips code (cweb.el goes here)
EMACSDIR=
# directory for the language header file "cweb.h"
CATINCLUDE= bin/catalogs/
# Set DESTPREF to null if you want to call the executables "tangle" and "weave"
# (probably NOT a good idea; we recommend leaving DESTPREF=c)
DESTPREF=c
# Set COMMONH to the name of the file `common.h' or any alternative to
# the original `common.h'.
COMMONH=comm-p.h
# Set CHCHANGES to comm-foo.hch if you need changes to common.h
CHCHANGES=comm-p.hch
# Set CCHANGES to comm-foo.ch if you need changes to common.w
CCHANGES=common.ch
# Set TCHANGES to ctang-foo.ch if you need changes to ctangle.w
TCHANGES=ctangle.ch
# Set WCHANGES to cweav-foo.ch if you need changes to cweave.w
WCHANGES=cweave.ch
# Set PCHANGES to prod-foo.ch if you need changes to prod.w
PCHANGES=
# Set MCHANGES to wmerge-foo.ch if you need changes to wmerge.w
MCHANGES=wmerge.ch
# These lists of arguments are specific for BCC.
# Change, add or delete things here to suit your personal conditions.
CFLAGS = -I$(CATINCLUDE) -DCWEBINPUTS="$(CWEBINPUTS)" -mh -AT
LINKFLAGS = $(CFLAGS)
# By default my version of cweave includes the option for AMIGA keywords
# and the use of German macros. So you have to switch these off for all
# the CWEB documentation. Also the `f' flag is turned off to save paper
WFLAGS=-fag
# What C compiler are you using?
CC = bcc
LINK = bcc
MAKE = make
# RM and CP are used below in case rm and cp are aliased
RM= del
CP= copy
INSTALL= copy
########## You shouldn't have to change anything after this point #######
CWEAVE = cweave
CTANGLE = ctangle
WMERGE = wmerge
SOURCES = cweave.w common.w ctangle.w
ALMOSTALL = common.w ctangle.w wmerge.w makefile readme \
common.c common.h $(COMMONH) ctangle.c wmerge.c \
cwebman.tex cwebmang.ch cweb.1 cweb.man cweb.el prod.w \
$(CCHANGES) $(CHCHANGES) $(TCHANGES) $(WCHANGES) $(PCHANGES) \
comm-vms.ch ctang-vms.ch cweav-vms.ch \
comm-man.ch ctang-man.ch cweav-man.ch \
makefile.amiga makefile.pc makefile.unix \
$(MACROSDIR)cwebmac.tex $(MACROSDIR)ccwebmac.tex $(MACROSDIR)gcwebmac.tex \
$(CATINCLUDE)cweb.h examples
ALL = $(ALMOSTALL) cweave.w
.SUFFIXES: .dvi .tex .w
.w.tex:
$(CWEAVE) $(WFLAGS) $* $*
.tex.dvi:
tex $<
.w.dvi:
$(MAKE) $*.tex
$(MAKE) $*.dvi
.c.obj:
$(CC) $(CFLAGS) -c $*.c
.w.c:
$(CTANGLE) $* $*
.w.obj:
$(MAKE) $*.c
$(MAKE) $*.obj
# When you say `smake' without any arguments, `smake' will jump to this item
default: ctangle.exe cweave.exe
# The complete set of files contains the two programs `ctangle' and
# `cweave' plus the program `wmerge', the manuals `cwebman' and `cwebmang'
# and the source documentations.
all: progs docs
# The objects of desire
progs: ctangle.exe cweave.exe wmerge.exe
cautiously: $(CTANGLE)
$(CP) common.c SAVEcommon.c
$(CTANGLE) common $(CCHANGES)
diff common.c SAVEcommon.c
$(RM) SAVEcommon.c
$(CP) ctangle.c SAVEctangle.c
$(CTANGLE) ctangle $(TCHANGES)
diff ctangle.c SAVEctangle.c
$(RM) SAVEctangle.c
SAVEctangle.c:
$(CP) ctangle.c SAVEctangle.c
SAVEcommon.c:
$(CP) common.c SAVEcommon.c
common.c: common.w $(CCHANGES)
$(CTANGLE) common $(CCHANGES)
common.obj: common.c $(CATINCLUDE)cweb.h
ctangle.exe: ctangle.obj common.obj
$(LINK) $(LINKFLAGS) ctangle.obj common.obj
ctangle.c: ctangle.w $(TCHANGES)
$(CTANGLE) ctangle $(TCHANGES)
ctangle.obj: ctangle.c $(CATINCLUDE)cweb.h $(COMMONH)
cweave.exe: cweave.obj common.obj
$(LINK) $(LINKFLAGS) cweave.obj common.obj
cweave.c: cweave.w $(WCHANGES)
$(CTANGLE) cweave $(WCHANGES)
cweave.obj: cweave.c $(CATINCLUDE)cweb.h $(COMMONH)
wmerge.exe: wmerge.c
$(CC) $(CFLAGS) wmerge.c
wmerge.c: wmerge.w $(MCHANGES)
$(CTANGLE) wmerge $(MCHANGES)
# additional rules to `wmerge' the remaining files
#
$(COMMONH): common.h $(CHCHANGES)
$(WMERGE) common.h $(CHCHANGES) $(COMMONH)
# Take a good lecture for bedtime reading
docs: cwebman.dvi cwebmang.dvi common.dvi ctangle.dvi cweave.dvi wmerge.dvi
cwebman.dvi: cwebman.tex
cwebmang.dvi: cwebmang.tex
common.dvi: common.tex
ctangle.dvi: ctangle.tex
cweave.dvi: cweave.tex
wmerge.dvi: wmerge.tex
usermanual: cwebmang.dvi
fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch
$(MAKE) cweave
$(CWEAVE) common.w comm-man.ch
$(MAKE) common.dvi
$(CWEAVE) ctangle.w ctang-man.ch
$(MAKE) ctangle.dvi
$(CWEAVE) cweave.w cweav-man.ch
$(MAKE) cweave.dvi
cwebmang.tex: cwebman.tex cwebmang.ch
$(WMERGE) cwebman.tex cwebmang.ch cwebmang.tex
# for making the documentation we will have to include the change files
ctangle.tex: ctangle.w $(COMMONH) $(TCHANGES)
$(CWEAVE) $(WFLAGS) ctangle $(TCHANGES)
cweave.tex: cweave.w $(COMMONH) $(WCHANGES)
$(CWEAVE) $(WFLAGS) cweave $(WCHANGES)
common.tex: common.w $(CCHANGES)
$(CWEAVE) $(WFLAGS) common $(CCHANGES)
wmerge.tex: wmerge.w $(MCHANGES)
$(CWEAVE) $(WFLAGS) wmerge $(MCHANGES)
# be sure to leave ctangle.c and common.c and $(COMMONH) for bootstrapping
clean:
$(RM) *.obj
$(RM) *.bak
$(RM) *.log
$(RM) *.dvi
$(RM) *.toc
$(RM) *.idx
$(RM) *.scn
$(RM) common.tex
$(RM) cweave.tex
$(RM) cweave.c
$(RM) ctangle.tex
$(RM) cweave.exe
$(RM) ctangle.exe
$(RM) cwebmang.tex
$(RM) wmerge.tex
$(RM) wmerge.exe
# Install the new program versions where they can be found
install: bin/ctangle bin/cweave bin/wmerge $(MACROSDIR)ccwebmac.tex
$(INSTALL) cweave.exe $(DESTDIR)$(DESTPREF)weave.exe
$(INSTALL) ctangle.exe $(DESTDIR)$(DESTPREF)tangle.exe
$(INSTALL) wmerge.exe $(DESTDIR)wmerge.exe